package g

import (
	"sync"

	"github.com/yanyiwu/gojieba"
)

// const KeyAbsPath = "/home/huangheng/workspace/fhe-search/huangheng/huangheng20240529/"
// const FileBasePath = "/home/huangheng/workspace/fhe-search/huangheng/encdb/"
// const HttpPort = 5020

var (
	cutter     *gojieba.Jieba
	cutterOnce sync.Once
)

// GetCutter 单例模式创建cutter
func GetCutter() *gojieba.Jieba {
	cutterOnce.Do(func() {
		cutter = gojieba.NewJieba()
	})
	return cutter
}

const MachineID = 1
const MaxTermLen = 20

// MysqlMaxAllUnitNum 每次批量插入，行数*列数应当小于65536，这里取60000
// 参考https://blog.csdn.net/trinityleo5/article/details/139934591
const MysqlMaxAllUnitNum = 60000
